package prototype;

public class Rectangle implements Shape {

    private int width;
    private int height;

    public void setWidth(int width) {
        this.width = width;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    @Override
    public Object clone() {
        Rectangle clone = null;
        try {
            clone = (Rectangle) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return clone;
    }

    @Override
    public void draw() {
        System.out.println("Draw a rectangle, width is " + width + ", height is " + height + ".");
    }
}
